/*
Erik Wright
test.cpp

this is a testing and debugging program for the bot_motion class.

*/
#include "marionette.h"
#include <iostream>
using namespace std;




int main()
{
	cout<<"seeding random number generator"<<endl;	
	srand(time(NULL));			//seed pseudo random number generator

	cout<<"creating new class"<<endl;
	marionette_control* chromo_a = new marionette_control(15,5);
	marionette_control* chromo_b = new marionette_control(15,5);	

	cout<<"chromo_a:  "<<endl;
	chromo_a->display_sequence();
	cout<<endl<<endl;
	
	cout<<"chromo_b:  "<<endl;
	chromo_b->display_sequence();

	cout<<"__________AND TWIST___________"<<endl;

	chromo_a->binary_twist_rand(chromo_b, 1);	//twist a with b

	cout<<"chromo_a:  "<<endl;
	chromo_a->display_sequence();
	cout<<endl<<endl;
	
	cout<<"chromo_b:  "<<endl;
	chromo_b->display_sequence();








//-----------------bot_motion test routine-----------------------
/*
	motion_event* lista = new motion_event(1500, 10, 10);
	motion_event* listb = new motion_event(1500, 10,10);
	motion_event* temp;

	for(int i=0; i<9; i++)
	{
		temp = new motion_event();
		lista->insert_at_end(temp);
		temp = new motion_event();
		listb->insert_at_end(temp);
		
	}

	cout<<"LIST A:	";
	lista->inorder_display();
		
	cout<<"LIST B:	";
	listb->inorder_display();


	lista->binary_twist_rand(listb, false);		//round up
	
	cout<<endl<<"+++++++++++++++++++++++++++++++++++"<<endl;
	cout<<"LIST A:	";
	lista->inorder_display();
		
	cout<<"LIST B:	";
	listb->inorder_display();
	
	delete lista;
	delete listb;
*/



	cout<<"Deleting memory"<<endl;
	delete chromo_a;
	delete chromo_b;

	cout<<"--------------end-----------------"<<endl;
	return 0;

}
